package cn.pugle.base.generic;

import com.google.common.reflect.TypeToken;

import java.lang.reflect.Type;

/**
 * @author tzp
 * @since 2020/7/1
 */
public class AClassG<T> {
    private final TypeToken<T> typeToken = new TypeToken<T>(getClass()) {
    };
    private final Type type = typeToken.getType(); // or getRawType() to return Class<? super T>

    public Type getType() {
        return type;
    }

    private T t;

    public AClassG(T t) {
        this.t = t;
    }

    public T getT() {
        return t;
    }
}
